{template 'web/_header'}
{template 'tabs'}
 {if $operation=='display'}  
    <form action="" method="post" enctype="multipart/form-data">
    <div class="panel panel-info">
    <div class="panel-heading">筛选</div>
	<div class="panel-body">
            <div class="form-group">
                <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">会员信息</label>
                <div class="col-sm-8 col-lg-6 col-xs-12">
                    <input type="text" class="form-control"  name="realname" value="{$_GPC['realname']}" placeholder="可搜索创建人呢称/创建人姓名"/> 
                </div>
                <div class="col-sm-7 col-lg-3 col-xs-12">
                                <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                                <input type="hidden" name="token" value="{$_W['token']}" />
                                <button type="submit" name="export" value="1" class="btn btn-primary">导出 Excel</button>
		</div>
            </div>
	</div>
	</div>
<div class="panel panel-default">
    <div class="panel-body table-responsive">
        <table class="table table-hover">
            <thead class="navbar-inner">
                <tr>
                    <th style="width:10%;">ID</th>
                    <th style='width:10%'>创建时间</th>
                    <th style='width:10%'>领取时间</th>
                    <th style='width:10%'>创建人呢称</th>
                    <th style='width:10%'>创建人姓名</th>
                    <th style='width:10%'>领取人呢称</th>
                    <th style='width:10%'>领取人姓名</th>
                    <th style='width:10%'>金额</th>
                    <th style='width:10%'>状态</th>
                </tr>
            </thead>
            <tbody>
                {loop $list $row}
                <tr>
                    <td>{$row['id']}</td>
                    <td>{$row['createtime']} </td>
                    <td>{$row['gettime']} </td>
                    <td>{$row['nickname']} </td>
                    <td>{$row['realname']} </td>
                    <td>{$row['nickname2']} </td>
                    <td>{$row['realname2']} </td>
                    <td>{$row['money']}</td>
                    <td>{if $row['status']==1}
                        <label class="label label-danger">已领取</label>
                        {/if}
                        {if $row['status']==0}
                        <label class="label label-info">未领取</label>&nbsp;&nbsp;&nbsp;&nbsp;
                        <button onclick="return confirm('此操作不可恢复，确认吗？'); return false;" type="submit" name="refund" value="{$row['id']}" class="btn btn-primary">退还金币</button>
                        {/if}
                        {if $row['status']==2}
                        <label class="label label-default">已退还</label>
                        {/if}
                    </td>
                </tr>
                {/loop}
            </tbody>
        </table>
        {$pager}
    </div>
</div>
</form>
 {/if}
{template 'web/_footer'}
 